package 设计模式.基本原则.里氏代换原则.after;

public class Test {
    public static void main(String[] args) {

    }

    public static void resize(changfangxing changfangxing) {
        //如果宽如果比长小,就把它扩宽
        while (changfangxing.getLength() >= changfangxing.getWidth()) {
            changfangxing.setWidth(changfangxing.getWidth() + 1);
        }
    }

    public static void display(shibianxing s) {
        System.out.println("长为" + s.getLength());
        System.out.println("宽为" + s.getWidth());
    }
}
